stop

open fun stop()

Stops or pauses the active operation of this control.

This typically involves pausing content playback, animations, or data fetching, and potentially reducing resource consumption. The control should retain its state so it can be resumed by #start().

Calling stop()} on an already stopped control should be a no-op.

Stops the Flash content.

For a WebView displaying Flash, stopping typically involves:

  1. Stopping any active loading in the WebView (e.g., using stopLoading).
  2. Optionally, loading a blank page (e.g., loadUrl("about:blank")) to clear the current content and potentially release some resources associated with the Flash plugin.
  3. If the Flash content (SWF) has a specific ActionScript function to stop or unload itself, that function should be called via JavaScript. For example, if the SWF exposes a JavaScript-callable function like stopMovie(), it could be invoked using executeJavascript("yourSwfObject.stopMovie();").
  4. Pausing the WebView's internal processing using onPause can also be beneficial to reduce resource consumption when the view is not active. This pauses timers, JavaScript execution, and other WebView activities.
The most appropriate actions depend on the specific Flash content and the desired behavior upon stopping.

This implementation currently does not perform any specific stop actions. Consider implementing one or more of the following:

  • stopLoading();
  • loadUrl("about:blank");
  • executeJavascript("yourSwfStopFunction();"); (if applicable)
  • onPause(); (to pause WebView's processing)